<?php
/**
 * Created by PhpStorm.
 * User: admin
 * Date: 2022-11-24
 * Time: 8:55
 */

namespace App\server\dtk\tb;


use App\server\dtk\BaseAbstract;
use support\exception\BaseException;

class ListSuperGoods extends BaseAbstract
{
    protected $url = 'api/goods/list-super-goods';
    private $version = 'v1.3.0';

    /*
     * https://www.dataoke.com/pmc/api-d.html?id=14
     * */
    public function __construct($keyWords, $type = 0, $pageId = 1, $pageSize = 100)
    {
        if ($keyWords) {
            $this->data = [
                'version' => $this->version,
                'type' => $type,
                'pageId' => $pageId,
                'pageSize' => $pageSize,
                'keyWords' => $keyWords
            ];
        } else {
            throw new BaseException('请传入关键字');
        }
    }
}